package net.kirillka.ebooks;

import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;
import java.awt.Dimension;
import java.util.HashMap;

public class Constants
{
	public static final String IMG_OPEN = "resources/open.jpg";
	public static final String IMG_EXIT = "resources/exit.jpg";
	public static final String IMG_CAPTURE = "resources/capture.jpg";
	
	// fields that can be overwritten in the properties file
	public static final String propertiesFile = "jrb.properties";
	public static String outputDir = "C:\\Temp";
	public static String outputPrefix = "book-";
	public static boolean DEBUG = false;
	
	public static String[] devices = {"iPhone Vert", "iPhone Horiz", "BBerry 8700","Manual"};
	
	//public static final Dimension DIM_IPHONE_VERT = new Dimension(320, 480); // 320+43 (borders and scrollbar) x 480+109 (borders, scrollbar and buttons)
	//public static final Dimension DIM_IPHONE_HORIZ = new Dimension(480, 320);
	//public static final Dimension DIM_BBERRY8700 = new Dimension(320, 240);
	
	public static final Dimension DIM_IPHONE_VERT = new Dimension(363, 589); 
	public static final Dimension DIM_IPHONE_HORIZ = new Dimension(523, 429);
	public static final Dimension DIM_BBERRY8700 = new Dimension(363, 349);

	public static final double PAGE_DOWN_RATIO = 0.875; // every page down scrolls by 87.5% of the page height (by default, in IE 6)
	public static final int HORIZ_ACCESSORIES = 43; // borders and scrollbar
	public static final int VERT_ACCESSORIES = 109; // borders, button bar and scrollbar
	
	public static HashMap<String,Dimension> devMap = new HashMap<String,Dimension>();
	static {
			devMap.put(devices[0], DIM_IPHONE_VERT);
			devMap.put(devices[1], DIM_IPHONE_HORIZ);
			devMap.put(devices[2], DIM_BBERRY8700);
	}

	public static Image getImage(Device d, String name) { return new Image(d, name); } 
	
}
